<?php
namespace app\admin\controller;
use app\common\Apiv;
/**
 * @Author: K.EL
 * @Date:   2020-07-27 14:10:11
 * @Last Modified by:   K.EL
 * @Last Modified time: 2020-07-27 15:10:22
 */
class Sys extends Base{
	function clearncache(){
		// print_r(app()->getRuntimePath());
		// print_r(app()->getRootPath());
		$root_path = app()->getRootPath();
		//运行命令，清空缓存，php需要设置环境变量才能执行此命令
		exec("php ".$root_path."think clear --cache");
		return Apiv::result(1, 0, '缓存清除成功');
	}
}